// src/router/index.ts
import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router';
import System from '../views/System.vue';
import FrpTool from '../views/FrpTool.vue';
import Setting from '../views/Setting.vue';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/System',
        name: 'System',
        component: System,
    },
    {
        path: '/',
        name: 'FrpTool',
        component: FrpTool,
    },
    {
        path: '/Setting',
        name: 'Setting',
        component: Setting,
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

// 在这里添加路由的导航守卫
router.beforeEach((to, from, next) => {
    console.log('Navigating to:', from.path, to.path);
    next();
});

export default router;